Repository navigation
Block Vercel's Toolbar during Lighthouse and keep failed audit IDs - #228
Merged
Merged
Conversation
On 2026-11-20, best practices fell to 0.78 on all five pages of a PR preview, in two attempts, and a later run of the same PR scored 1.00. A local build scores 1.00. Vercel adds its Toolbar to previews from vercel.live, and the Toolbar can set a third-party cookie even with the proxy's x-vercel-skip-toolbar header. That fails third-party-cookies (weight 5) and inspector-issues (weight 1), which leaves 21 of 27 weighted points: 0.78. lighthouserc.cjs now blocks vercel.live and pusher.com during collection. Production never loads the Toolbar, and Lighthouse ignores a blocked request in errors-in-console. CI kept only category scores, so the failed run did not record which audits failed. Each Lighthouse job now also keeps the IDs of the scored audits below 1, per category, and prints them in its log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Will Manning <will@willmanning.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lwwmanning
marked this pull request as ready for review
November 21, 2026 01:35
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🔦 Lighthouse audit
Run |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
This changes the Lighthouse jobs in
.github/workflows/lighthouse.ymland their settings inlighthouserc.cjs, for both sites. The thresholds, the axe job, and the preview proxy are unchanged.Before, Vercel's Toolbar could load from
vercel.liveon a PR preview, even with the proxy'sx-vercel-skip-toolbarheader. The Toolbar can set a third-party cookie, which failsthird-party-cookies(weight 5) andinspector-issues(weight 1). That leaves 21 of 27 points, and best practices scores 0.78. On 2026-11-20, #227 scored 0.78 on all five pages in two attempts, and 1.00 in a later run. The Toolbar is the likely cause, but those runs did not record which audits failed.After, Lighthouse blocks
vercel.liveandpusher.comduring collection. Production never loads the Toolbar, and Lighthouse ignores a blocked request inerrors-in-console.Before, each job kept only the category scores, and the assertion log names only the category. After, each job also keeps the IDs of the scored audits below 1 for each category, and prints them in its log. The IDs are Lighthouse's audit names, not page content. The score comment is unchanged.
How it was checked
The 0.78 matches the weights in a Lighthouse 12.6.1 report, the version that the pinned action uses. The Lighthouse 12.6.1 source ignores
ERR_BLOCKED_BY_CLIENT.Inspectorinerrors-in-console. The new workflow step ran under bash on two saved reports, andscripts/lighthouse-comment.shstill reads its output. This PR's own Lighthouse run tests the block on a preview. It tests the fix only if the Toolbar sets its cookie during that run.git commit -s), for the DCO check.bun run check:cipasses.🤖 Generated with Claude Code